This repository has been archived by the owner on Jul 17, 2024. It is now read-only.
fix: Explicitly provide the host-triple of the version to install #22
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Rustup has a default-host-triple setting, that may different than the actual host environment. Proto currently don't support these two being different, andit would previously fail to find the executables for the version it had just installed.
While a better solution may to respect Rustup's default-host-triple and support manually specifying the host-triple, this patch at least leaves you with a working installation.
Ran into this because I apparently never ran rustup-init to configure the setting, after installing it on my M1 macbook via Homebrew, so it currently installs x86_64-apple-darwin but Proto looks for aarch64-apple-darwin.
Error log
proto install rust-test 1.76 info: syncing channel updates for '1.76.0-x86_64-apple-darwin' info: latest update on 2024-02-08, rust version 1.76.0 (07dca489a 2024-02-04) info: downloading component 'cargo' info: downloading component 'clippy' info: downloading component 'rust-docs' info: downloading component 'rust-std' info: downloading component 'rustc' 55.1 MiB / 55.1 MiB (100 %) 30.5 MiB/s in 1s ETA: 0s info: downloading component 'rustfmt' info: installing component 'cargo' info: installing component 'clippy' info: installing component 'rust-docs' 14.7 MiB / 14.7 MiB (100 %) 5.4 MiB/s in 1s ETA: 0s info: installing component 'rust-std' 25.3 MiB / 25.3 MiB (100 %) 19.1 MiB/s in 1s ETA: 0s info: installing component 'rustc' 55.1 MiB / 55.1 MiB (100 %) 21.3 MiB/s in 2s ETA: 0s info: installing component 'rustfmt'
1.76.0-x86_64-apple-darwin installed - (timeout reading rustc version)
info: checking for self-update
Error: proto::execute::missing_file
× Unable to find an executable for Rust, expected file ~/.rustup/toolchains/1.76.0-aarch64-apple-darwin/bin/cargo does not exist.